package com.sh.data.engine.application.model.dto.integration;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author: mengzheng.mhc
 * @date: 2024/6/27 16:33
 */
@Data
@Schema(description = "获取数据源")
@NotNull
@NoArgsConstructor
@AllArgsConstructor
public class GetDataSourceDTO {

    private List<DataSource> dataSources;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class DataSource {

        @Schema(description = "数据源id")
        private Long id;

        /**
         * 名称
         */
        @Schema(description = "数据源名称")
        private String dsName;

        /**
         * 数据源类型
         */
        @Schema(description = "数据源类型")
        private String dsType;

        @Schema(title = "状态", description = "1为正常，0为异常")
        private Integer status;

        @Schema(title = "1代表是系统默认存储,选中这个数据源可以一键建表", description = "如果为null,检查db中的字段值")
        private Integer isSystem;
    }
}
